# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=beaker
pkgbase="python-${_realname}"
pkgname=("python-${_realname}")
pkgver=1.11.0
pkgrel=4
pkgdesc="Caching and sessions WSGI middleware for use with web applications and stand-alone Python scripts and applications"
arch=('i686' 'x86_64')
license=('PSF')
url="http://beaker.groovie.org/"
depends=("python" "python-setuptools")
provides=("python3-${_realname}")
conflicts=("python3-${_realname}")
replaces=("python3-${_realname}")
source=("${_realname}-${pkgver}.tar.gz"::https://github.com/bbangert/beaker/archive/${pkgver}.tar.gz)
sha256sums=('5298f2d3be7b3ad8f299c9cc69b57907613412f397feb8c322896dbc857f5218')

prepare() {
  cd "${srcdir}/${_realname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  /usr/bin/python setup.py build
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"

  /usr/bin/python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/python-beaker/LICENSE"
}
